<html>
<head><meta charset="utf-8"><title>anon_const_instance_printing · t-compiler/const-eval · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/index.html">t-compiler/const-eval</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html">anon_const_instance_printing</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="135980032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135980032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135980032">(Oct 17 2018 at 15:33)</a>:</h4>
<blockquote>
<blockquote>
<p>but I haven't checked</p>
</blockquote>
<p>but not all <code>AnonConst</code> might be array lengths?</p>
</blockquote>



<a name="135980058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135980058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135980058">(Oct 17 2018 at 15:33)</a>:</h4>
<p>right, so we basically need to keep the <code>None</code> arm, check the parent, and decide on that what to print</p>



<a name="135980112"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135980112" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135980112">(Oct 17 2018 at 15:34)</a>:</h4>
<p>if the parent is an array type, print <code>LEN</code>, if it's an enum variant, print <code>DISCRIMINANT</code>, ...</p>



<a name="135980131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135980131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135980131">(Oct 17 2018 at 15:34)</a>:</h4>
<p>there aren't that many <code>AnonConst</code> in the <code>rustc::hir</code> datastructures</p>



<a name="135982164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135982164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135982164">(Oct 17 2018 at 16:04)</a>:</h4>
<p>the case where <code>get_opt_name</code> returns <code>None</code> is the one we are already in</p>



<a name="135982183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135982183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135982183">(Oct 17 2018 at 16:05)</a>:</h4>
<p>but before this even decides how to print the current thing, it prints the parent</p>



<a name="135982205"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135982205" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135982205">(Oct 17 2018 at 16:05)</a>:</h4>
<p>and <em>that's</em> what fails for the array length</p>



<a name="135982346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135982346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135982346">(Oct 17 2018 at 16:06)</a>:</h4>
<p>that's here: <a href="https://github.com/rust-lang/rust/blob/9d7f0da367bae7587ed0ef69bd4384392099fc9e/src/librustc/util/ppaux.rs#L264" target="_blank" title="https://github.com/rust-lang/rust/blob/9d7f0da367bae7587ed0ef69bd4384392099fc9e/src/librustc/util/ppaux.rs#L264">https://github.com/rust-lang/rust/blob/9d7f0da367bae7587ed0ef69bd4384392099fc9e/src/librustc/util/ppaux.rs#L264</a></p>



<a name="135982397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135982397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135982397">(Oct 17 2018 at 16:07)</a>:</h4>
<p><code>as_interned_str</code> seems like a good place to put the <code>{{LEN}}</code> in but for that we have to first print the parent</p>



<a name="135982442"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135982442" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135982442">(Oct 17 2018 at 16:08)</a>:</h4>
<p>so I dont think I understand what you are suggesting</p>



<a name="135983431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135983431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135983431">(Oct 17 2018 at 16:24)</a>:</h4>
<p>Oh... I misunderstood that. Printing an array type does not make sense here I think, we'd need to skip two Items I suppose</p>



<a name="135983437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/135983437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#135983437">(Oct 17 2018 at 16:24)</a>:</h4>
<p>maybe... I have to leave, I'll investigate tomorrow</p>



<a name="136068510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136068510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136068510">(Oct 18 2018 at 20:13)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@Oli</span> any news?</p>



<a name="136068603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136068603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136068603">(Oct 18 2018 at 20:15)</a>:</h4>
<p>nope, forgot about this, sorry</p>



<a name="136068615"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136068615" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136068615">(Oct 18 2018 at 20:15)</a>:</h4>
<p>kk</p>



<a name="136103378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136103378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136103378">(Oct 19 2018 at 10:46)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/55199" target="_blank" title="https://github.com/rust-lang/rust/pull/55199">https://github.com/rust-lang/rust/pull/55199</a> fixed</p>



<a name="136103384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136103384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136103384">(Oct 19 2018 at 10:47)</a>:</h4>
<p>it's untestable without <code>RUST_LOG</code> sadly</p>



<a name="136103387"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136103387" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136103387">(Oct 19 2018 at 10:47)</a>:</h4>
<p>so I don't think I can add regression tests</p>



<a name="136103842"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136103842" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136103842">(Oct 19 2018 at 10:58)</a>:</h4>
<p>Add an <code>info!</code> ? heh.</p>



<a name="136103849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136103849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136103849">(Oct 19 2018 at 10:58)</a>:</h4>
<p>or wait, what debug level is <code>trace!</code> at?</p>



<a name="136103862"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136103862" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136103862">(Oct 19 2018 at 10:59)</a>:</h4>
<p>that is, is it included in non-debug builds of <code>rustc</code> ?</p>



<a name="136103870"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136103870" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136103870">(Oct 19 2018 at 10:59)</a>:</h4>
<p>if so, you could resort to a <code>run-make/</code> test (yikes!)</p>



<a name="136104571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136104571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136104571">(Oct 19 2018 at 11:16)</a>:</h4>
<p>oh, info would work, too, but yea, I don't want a run-make test <span class="emoji emoji-1f615" title="confused">:confused:</span></p>



<a name="136104697"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136104697" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136104697">(Oct 19 2018 at 11:19)</a>:</h4>
<p>aren't there tests that link to librustc?</p>



<a name="136104707"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136104707" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136104707">(Oct 19 2018 at 11:19)</a>:</h4>
<p>they could do a <code>println("{:?}", some_instance)</code></p>



<a name="136104771"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136104771" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136104771">(Oct 19 2018 at 11:20)</a>:</h4>
<p>almost. then I'd still need to get an instance <span class="emoji emoji-1f615" title="confused">:confused:</span></p>



<a name="136104778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/136104778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#136104778">(Oct 19 2018 at 11:21)</a>:</h4>
<p>hm yeah</p>



<a name="203535671"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203535671" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203535671">(Jul 10 2020 at 17:31)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> this seems to have arisen again, rustfmt and RLS are failing to build due to an ICE caused at the to string call</p>



<a name="203535686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203535686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203535686">(Jul 10 2020 at 17:31)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/74081">https://github.com/rust-lang/rust/issues/74081</a></p>



<a name="203535713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203535713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203535713">(Jul 10 2020 at 17:31)</a>:</h4>
<p>we're trying to see if bumping rustfmt's internal libraries fixes it though</p>



<a name="203535821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203535821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203535821">(Jul 10 2020 at 17:32)</a>:</h4>
<p>okay, just finished testing that, doesn't seem like it does fix it. here's a backtrace: <a href="https://gist.github.com/Mark-Simulacrum/c1fd825658ba202c9d7f8be9293f62bc">https://gist.github.com/Mark-Simulacrum/c1fd825658ba202c9d7f8be9293f62bc</a></p>



<a name="203583571"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203583571" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203583571">(Jul 11 2020 at 06:33)</a>:</h4>
<p>uhm... so apparently rustc is const evaluating <a href="https://github.com/rust-lang/hashbrown/blob/fd03e12a3fbe4833b38a455e62128d8b13641d28/src/raw/mod.rs#L1321">https://github.com/rust-lang/hashbrown/blob/fd03e12a3fbe4833b38a455e62128d8b13641d28/src/raw/mod.rs#L1321</a> which is neither a const fn, nor has it zero arguments</p>



<a name="203583753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203583753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203583753">(Jul 11 2020 at 06:39)</a>:</h4>
<p>High probability that the fault is <a href="https://github.com/rust-lang/rust/pull/73871">https://github.com/rust-lang/rust/pull/73871</a></p>



<a name="203583766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203583766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203583766">(Jul 11 2020 at 06:39)</a>:</h4>
<p>It's super high up in the stack: <a href="https://gist.github.com/Mark-Simulacrum/c1fd825658ba202c9d7f8be9293f62bc#file-gistfile1-txt-L39">https://gist.github.com/Mark-Simulacrum/c1fd825658ba202c9d7f8be9293f62bc#file-gistfile1-txt-L39</a></p>



<a name="203584235"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584235" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584235">(Jul 11 2020 at 06:55)</a>:</h4>
<p>ugh not that stuff again</p>



<a name="203584273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584273">(Jul 11 2020 at 06:56)</a>:</h4>
<p>I remember <span class="user-mention" data-user-id="116083">@pnkfelix</span> bringing up something related to that, I think? but then it fell through the cracks again</p>



<a name="203584276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584276">(Jul 11 2020 at 06:56)</a>:</h4>
<p>more readable version of oli's gist: <a href="https://gist.githubusercontent.com/Mark-Simulacrum/c1fd825658ba202c9d7f8be9293f62bc/raw/7b78f74d28cb90e8cb079b91ebba718c6d0adcb1/gistfile1.txt">https://gist.githubusercontent.com/Mark-Simulacrum/c1fd825658ba202c9d7f8be9293f62bc/raw/7b78f74d28cb90e8cb079b91ebba718c6d0adcb1/gistfile1.txt</a></p>



<a name="203584333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584333">(Jul 11 2020 at 06:58)</a>:</h4>
<div class="codehilite"><pre><span></span><code> 209:     0x7fe13036d32e - rustc_middle::mir::interpret::queries::&lt;impl rustc_middle::ty::context::TyCtxt&gt;::const_eval_resolve::hc189e1a9ad3fa99d
                               at src/librustc_middle/mir/interpret/queries.rs:45
 210:     0x7fe12f9955b6 - rustc_middle::ty::sty::Const::eval::h877b3831cdee3589
                               at /home/mark/Build/rust/src/librustc_middle/ty/sty.rs:2369
</code></pre></div>



<a name="203584336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584336">(Jul 11 2020 at 06:58)</a>:</h4>
<p>why would there be an <code>Unevaluated</code> for that <code>new</code> method?</p>



<a name="203584516"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584516" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584516">(Jul 11 2020 at 07:04)</a>:</h4>
<p>idk, I tried to track that down, but then figured I'd first look at the PRs</p>



<a name="203584519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584519">(Jul 11 2020 at 07:05)</a>:</h4>
<p>but none of the PRs could cause a change to constants afaict</p>



<a name="203584536"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584536" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584536">(Jul 11 2020 at 07:05)</a>:</h4>
<p>okay, <code>.find(|child| child.res.def_id() == def_id)</code> in <code>ty/print/pretty.rs</code> could be rewritten</p>



<a name="203584576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584576">(Jul 11 2020 at 07:06)</a>:</h4>
<p>this must be hitting the stdlib or something, and specifically one of the lists of builtin macros. or a reexport in some random crate?</p>



<a name="203584578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584578">(Jul 11 2020 at 07:06)</a>:</h4>
<p>I'm currently trying to produce some logging output to see if we really have an unevaluated for the function and not maybe something else</p>



<a name="203584586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584586">(Jul 11 2020 at 07:06)</a>:</h4>
<p>are you fixing the <code>pretty.rs</code> code? do we know how to even trigger this?</p>



<a name="203584587"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584587" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584587">(Jul 11 2020 at 07:07)</a>:</h4>
<p>(where the something else just prints its query stack like this)</p>



<a name="203584593"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584593" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584593">(Jul 11 2020 at 07:07)</a>:</h4>
<p>I think just build rustfmt with debug assertions on</p>



<a name="203584596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584596">(Jul 11 2020 at 07:07)</a>:</h4>
<p>(with a rustc with debug assertions on)</p>



<a name="203584597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584597">(Jul 11 2020 at 07:07)</a>:</h4>
<p>okay but we can't really make a testcase out of that :(</p>



<a name="203584598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584598">(Jul 11 2020 at 07:07)</a>:</h4>
<p>time to try to repro from scratch on playground I guess</p>



<a name="203584601"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584601" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584601">(Jul 11 2020 at 07:08)</a>:</h4>
<p>no, that's why I want to add some logging</p>



<a name="203584641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584641">(Jul 11 2020 at 07:08)</a>:</h4>
<p>I want to know the site that causes this</p>



<a name="203584652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584652">(Jul 11 2020 at 07:09)</a>:</h4>
<p>I wonder if we could insert things into the query stack for printing spans without actually adding a query.</p>



<a name="203584654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584654">(Jul 11 2020 at 07:09)</a>:</h4>
<p>lol</p>



<a name="203584656"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584656" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584656">(Jul 11 2020 at 07:09)</a>:</h4>
<p>I'm serious!</p>



<a name="203584659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584659">(Jul 11 2020 at 07:09)</a>:</h4>
<p>this would have helped so many times</p>



<a name="203584699"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584699" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584699">(Jul 11 2020 at 07:10)</a>:</h4>
<p>oh, attach more data to the query backtrace?</p>



<a name="203584700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584700">(Jul 11 2020 at 07:10)</a>:</h4>
<p>and right here it would give us the places that the collector is looking at</p>



<a name="203584706"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584706" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584706">(Jul 11 2020 at 07:10)</a>:</h4>
<p>I could see there being something that's like logging but it buffers into the current query's stack frame</p>



<a name="203584710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584710">(Jul 11 2020 at 07:10)</a>:</h4>
<p>yea, you need to be proactive though, you can't figure it out when you hit the assert I think</p>



<a name="203584713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584713">(Jul 11 2020 at 07:10)</a>:</h4>
<p>but <em>shrug</em> we should just switch to <code>tracing</code> and have proper hierarchical logging</p>



<a name="203584714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584714">(Jul 11 2020 at 07:10)</a>:</h4>
<p>so we'd do this just in debug assert mode or sth</p>



<a name="203584717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584717">(Jul 11 2020 at 07:11)</a>:</h4>
<p>right</p>



<a name="203584718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584718">(Jul 11 2020 at 07:11)</a>:</h4>
<p>or that</p>



<a name="203584723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584723">(Jul 11 2020 at 07:11)</a>:</h4>
<p>didn't we have an MCP for that?</p>



<a name="203584737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584737">(Jul 11 2020 at 07:11)</a>:</h4>
<p>nope</p>



<a name="203584738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584738">(Jul 11 2020 at 07:11)</a>:</h4>
<p>damn</p>



<a name="203584742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584742">(Jul 11 2020 at 07:11)</a>:</h4>
<p>I guess I'll do that then</p>



<a name="203584782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584782">(Jul 11 2020 at 07:12)</a>:</h4>
<p>I know some people over in wg-traits were excited about it</p>



<a name="203584783"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584783" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584783">(Jul 11 2020 at 07:12)</a>:</h4>
<p>like a month or two ago</p>



<a name="203584790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584790">(Jul 11 2020 at 07:12)</a>:</h4>
<p>yea I think it was said "do an MCP" and that never happened</p>



<a name="203584807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584807">(Jul 11 2020 at 07:13)</a>:</h4>
<p>cc <span class="user-mention" data-user-id="232957">@Jack Huey</span> I guess?</p>



<a name="203584812"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584812" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584812">(Jul 11 2020 at 07:13)</a>:</h4>
<p>this looks great :D <a href="#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201164847">https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/tracing-tree/near/201164847</a></p>



<a name="203584853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584853">(Jul 11 2020 at 07:14)</a>:</h4>
<p>although I wonder how it will scale to rustc's deep callstacks :P</p>



<a name="203584909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203584909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203584909">(Jul 11 2020 at 07:16)</a>:</h4>
<p><a href="https://github.com/rust-lang/compiler-team/issues/331">https://github.com/rust-lang/compiler-team/issues/331</a></p>



<a name="203585304"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585304" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585304">(Jul 11 2020 at 07:29)</a>:</h4>
<p>ugh I got distracted</p>



<a name="203585368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585368">(Jul 11 2020 at 07:31)</a>:</h4>
<p>so the problem is a <em>renaming</em> reexport in the same module that also reexports one of the builtin macros</p>



<a name="203585408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585408">(Jul 11 2020 at 07:32)</a>:</h4>
<p>and prelude doesn't rename. so I can't test this on playground :(</p>



<a name="203585410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585410">(Jul 11 2020 at 07:32)</a>:</h4>
<p>/me remembers they can use <code>echo '...' | rustc -</code> with multiline code snippets, in <code>fish</code></p>



<a name="203585792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585792">(Jul 11 2020 at 07:44)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> okay I can't really get this <code>.def_id()</code> to panic... I wonder where I need to get me some bad reexports from</p>



<a name="203585881"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585881" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585881">(Jul 11 2020 at 07:47)</a>:</h4>
<p>oh I see it panics here:</p>
<div class="codehilite"><pre><span></span><code>  75:     0x7fe130368058 - rustc_hir::def::Res&lt;Id&gt;::def_id::{{closure}}::h9150df0de4562214
                               at /home/mark/Build/rust/src/libstd/macros.rs:16
</code></pre></div>



<a name="203585886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585886">(Jul 11 2020 at 07:47)</a>:</h4>
<p>then it tries to print the query stack and panics again lol</p>



<a name="203585925"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585925" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585925">(Jul 11 2020 at 07:48)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> so you need to fix the bug to even see the query stack</p>



<a name="203585928"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585928" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585928">(Jul 11 2020 at 07:48)</a>:</h4>
<p>yea I saw the double panic, but didn't realize we were missing some parts during debugging</p>



<a name="203585930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585930">(Jul 11 2020 at 07:48)</a>:</h4>
<p>I'm amazed we get anything at all</p>



<a name="203585931"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585931" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585931">(Jul 11 2020 at 07:49)</a>:</h4>
<p>I guess it panics <em>while</em> printing</p>



<a name="203585937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585937">(Jul 11 2020 at 07:49)</a>:</h4>
<p>so we're missing whatever tried to const-eval that <code>new</code> method?</p>



<a name="203585940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585940">(Jul 11 2020 at 07:49)</a>:</h4>
<p>the panic has been caught -&gt; no double panic</p>



<a name="203585942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585942">(Jul 11 2020 at 07:49)</a>:</h4>
<p>oh weird</p>



<a name="203585981"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585981" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585981">(Jul 11 2020 at 07:50)</a>:</h4>
<p>are you sure it's not something <em>inside</em> the <code>new</code> method?</p>



<a name="203585983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585983">(Jul 11 2020 at 07:50)</a>:</h4>
<p>look at the backtrace, it's panicking while it's printing the query stack</p>



<a name="203585985"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585985" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585985">(Jul 11 2020 at 07:50)</a>:</h4>
<p>we've had confusing stack traces before</p>



<a name="203585988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585988">(Jul 11 2020 at 07:50)</a>:</h4>
<p>I wonder if it hits a query cycle and panics trying to print it</p>



<a name="203585989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585989">(Jul 11 2020 at 07:50)</a>:</h4>
<p>yea, the panic was caught, so we print the query stack, ...</p>



<a name="203585995"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585995" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585995">(Jul 11 2020 at 07:51)</a>:</h4>
<p><del>the backtrace before the panic was caught includes trying to print the query stack</del> wait I'm not sure</p>



<a name="203585998"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203585998" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203585998">(Jul 11 2020 at 07:51)</a>:</h4>
<p>anyway just fix the bug lol</p>



<a name="203586039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586039">(Jul 11 2020 at 07:52)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> replace the <code>.def_id() == def_id</code> with <code>.opt_def_id() == Some(def_id)</code></p>



<a name="203586044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586044">(Jul 11 2020 at 07:53)</a>:</h4>
<p>in <code>src/librustc_middle/ty/print/pretty.rs</code> on line 396 or w/e</p>



<a name="203586046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586046">(Jul 11 2020 at 07:53)</a>:</h4>
<p>I'm trying to figure out how to even get a non-<code>DefId</code> child</p>



<a name="203586197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586197">(Jul 11 2020 at 07:58)</a>:</h4>
<p>a <code>#[rustc_builtin_macro]</code> still has a proper <code>DefId</code>, right?</p>



<a name="203586260"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586260" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586260">(Jul 11 2020 at 08:00)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> oh btw I wanted to list the missing queries:</p>
<ul>
<li><code>normalize_generic_arg_after_erasing_regions</code></li>
<li><code>collect_and_partition_mono_items</code></li>
</ul>



<a name="203586266"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586266" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586266">(Jul 11 2020 at 08:00)</a>:</h4>
<p>I believe it's <code>normalize_generic_arg_after_erasing_regions</code>' argument that triggers the bug</p>



<a name="203586392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586392">(Jul 11 2020 at 08:03)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> omg I think I found it, I can't believe this code compiles</p>



<a name="203586396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586396">(Jul 11 2020 at 08:03)</a>:</h4>
<p>aaand no crash still?</p>



<a name="203586407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586407">(Jul 11 2020 at 08:04)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> oh I'm dumb the order matters and I had the correct thing first <em>sigh</em></p>



<a name="203586445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586445">(Jul 11 2020 at 08:04)</a>:</h4>
<p>bingo</p>



<a name="203586453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586453">(Jul 11 2020 at 08:05)</a>:</h4>
<div class="codehilite"><pre><span></span><code><span class="nb">echo</span> <span class="s1">&#39;</span>
<span class="s1">    mod private {</span>
<span class="s1">        pub mod public { pub struct Pub; }</span>
<span class="s1">    }</span>
<span class="s1">    pub use cfg_attr as attr; // built-in attribute</span>
<span class="s1">    pub use private::public as renamed;</span>
<span class="s1">&#39;</span> <span class="p">|</span> rustc +rust-2-stage1 - --crate-type<span class="o">=</span>lib --crate-name<span class="o">=</span>dep --edition<span class="o">=</span><span class="m">2018</span>

<span class="nb">echo</span> <span class="s1">&#39;fn main() { let () = dep::renamed::Pub; }&#39;</span> <span class="p">|</span> rustc - --extern <span class="nv">dep</span><span class="o">=</span>libdep.rlib
</code></pre></div>



<a name="203586501"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586501" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586501">(Jul 11 2020 at 08:07)</a>:</h4>
<p>so you'd need to find a crate that does <code>pub use \w+ as</code> where the name coincides with a builtin attribute name</p>



<a name="203586540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586540">(Jul 11 2020 at 08:08)</a>:</h4>
<p>hmm maybe it doesn't need to be that specific. but I'm not finding any examples</p>



<a name="203586588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586588">(Jul 11 2020 at 08:10)</a>:</h4>
<p>not really finding any examples under <code>~/.cargo</code> that match builtin attribute names</p>



<a name="203586596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586596">(Jul 11 2020 at 08:10)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> if you want I can take over, my workdirs are a bit kept up at the moment but I think I can make it work</p>



<a name="203586602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586602">(Jul 11 2020 at 08:11)</a>:</h4>
<p>but you should be able to make a test that fails until <code>.def_id()</code> is replaced with <code>.opt_def_id()</code></p>



<a name="203586745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203586745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203586745">(Jul 11 2020 at 08:16)</a>:</h4>
<p>I should report it as an issue I guess</p>



<a name="203587213"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587213" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587213">(Jul 11 2020 at 08:34)</a>:</h4>
<p><span class="user-mention" data-user-id="244331">@da-x</span> hey! did you independently fix this, or what happened?</p>



<a name="203587215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587215">(Jul 11 2020 at 08:34)</a>:</h4>
<p>I just saw <a href="https://github.com/rust-lang/rust/issues/74081#issuecomment-657012684">https://github.com/rust-lang/rust/issues/74081#issuecomment-657012684</a></p>



<a name="203587271"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587271" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587271">(Jul 11 2020 at 08:37)</a>:</h4>
<p><span class="user-mention" data-user-id="244331">@da-x</span> if you want to submit a PR make sure to include the testcase from <a href="https://github.com/rust-lang/rust/issues/74236">https://github.com/rust-lang/rust/issues/74236</a></p>



<a name="203587276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587276">(Jul 11 2020 at 08:37)</a>:</h4>
<p>(and make sure to run the tests w/o the fix applied to make sure it doesn't pass)</p>



<a name="203587322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587322">(Jul 11 2020 at 08:38)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> oh...... this is what triggers everything.... I'm dumb <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/const_eval/eval_queries.rs#L281-L286">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/const_eval/eval_queries.rs#L281-L286</a></p>



<a name="203587326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587326">(Jul 11 2020 at 08:39)</a>:</h4>
<p>maybe this could be set up better?</p>



<a name="203587334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587334">(Jul 11 2020 at 08:39)</a>:</h4>
<p>I guess it'd be hard to make it more obvious that it's triggered by that</p>



<a name="203587375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587375">(Jul 11 2020 at 08:40)</a>:</h4>
<p>how did I misread the backtrace though</p>



<a name="203587386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587386">(Jul 11 2020 at 08:41)</a>:</h4>
<p>I am very confused as to what's happening</p>



<a name="203587391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587391">(Jul 11 2020 at 08:41)</a>:</h4>
<p>there's definitely missing entries in the query stack just based on <code>::compute</code> entries in the backtrace</p>



<a name="203587491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587491">(Jul 11 2020 at 08:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> how did you get that backtrace? was <code>RUST_BACKTRACE=1</code> set?</p>



<a name="203587505"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587505" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587505">(Jul 11 2020 at 08:45)</a>:</h4>
<p>any chance there was anything before the contents of <a href="https://gist.githubusercontent.com/Mark-Simulacrum/c1fd825658ba202c9d7f8be9293f62bc/raw/7b78f74d28cb90e8cb079b91ebba718c6d0adcb1/gistfile1.txt">https://gist.githubusercontent.com/Mark-Simulacrum/c1fd825658ba202c9d7f8be9293f62bc/raw/7b78f74d28cb90e8cb079b91ebba718c6d0adcb1/gistfile1.txt</a></p>



<a name="203587546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587546">(Jul 11 2020 at 08:46)</a>:</h4>
<p>because it <em>looks</em> like, unless some buffering shenanigans are happening, that the backtrace in there is produced by a second nested <code>report_ice</code> calling into the default panic hook</p>



<a name="203587559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587559">(Jul 11 2020 at 08:47)</a>:</h4>
<p>meaning that the first <code>report_ice</code> would've already called the hook, and there should be another backtrace above the pasted one</p>



<a name="203587600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587600">(Jul 11 2020 at 08:48)</a>:</h4>
<p>(this is what I'm referring to: <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_driver/lib.rs#L1159-L1161">https://github.com/rust-lang/rust/blob/master/src/librustc_driver/lib.rs#L1159-L1161</a>)</p>



<a name="203587727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587727">(Jul 11 2020 at 08:52)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> so I think that the canary <code>.to_string()</code> should probably be wrapped in a <code>catch_unwind</code></p>



<a name="203587731"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587731" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587731">(Jul 11 2020 at 08:53)</a>:</h4>
<p>although no that wouldn't help argh</p>



<a name="203587734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587734">(Jul 11 2020 at 08:53)</a>:</h4>
<p>it's kind of funny how unstoppable some stuff is once it gets going</p>



<a name="203587785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587785">(Jul 11 2020 at 08:55)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> trying to print an <code>Instance</code>, if it panics, actually guarantees you'll get this double panic nonsense. because it will panic again in the panic handler, when it tries to print the query stack. so you need to set a thread-local flag or something telling the ICE handler to not try to print the query stack lol, because it's guaranteed to panic</p>



<a name="203587787"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203587787" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203587787">(Jul 11 2020 at 08:55)</a>:</h4>
<p>this is so cursed</p>



<a name="203592284"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592284" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592284">(Jul 11 2020 at 11:19)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> there is indeed a good chance that there was another backtrace before that, I think I assumed it was from a different crate. I can get that copied too if it's helpful</p>



<a name="203592330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592330">(Jul 11 2020 at 11:20)</a>:</h4>
<p>it would help confirm my theory of how this double panic happens</p>



<a name="203592407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592407">(Jul 11 2020 at 11:23)</a>:</h4>
<p>working on getting it then</p>



<a name="203592468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592468">(Jul 11 2020 at 11:24)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span> <a href="https://gist.github.com/Mark-Simulacrum/2abee553db3ca55b9cd5272fc43a5308">https://gist.github.com/Mark-Simulacrum/2abee553db3ca55b9cd5272fc43a5308</a></p>



<a name="203592751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592751">(Jul 11 2020 at 11:32)</a>:</h4>
<p>raw: <a href="https://gist.githubusercontent.com/Mark-Simulacrum/2abee553db3ca55b9cd5272fc43a5308/raw/9fa12f0cfa2397af7f1331cc8f8f598a8aa24bd6/gistfile1.txt">https://gist.githubusercontent.com/Mark-Simulacrum/2abee553db3ca55b9cd5272fc43a5308/raw/9fa12f0cfa2397af7f1331cc8f8f598a8aa24bd6/gistfile1.txt</a></p>



<a name="203592754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592754">(Jul 11 2020 at 11:33)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> thanks! this confirms it :D</p>



<a name="203592763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dan Aloni (da-x) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592763">(Jul 11 2020 at 11:33)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span>  where does <code>cfg_attr</code> come from in the test case?</p>



<a name="203592764"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592764" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592764">(Jul 11 2020 at 11:33)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> so I was right. the second panic is triggered by the <a href="https://github.com/rust-lang/rust/issues/3">#3</a> query stack frame. so <code>normalize_generic_arg_after_erasing_regions</code></p>



<a name="203592765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592765">(Jul 11 2020 at 11:33)</a>:</h4>
<p><span class="user-mention" data-user-id="244331">@da-x</span> Rust :)</p>



<a name="203592803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592803">(Jul 11 2020 at 11:34)</a>:</h4>
<p>it's <code>#[cfg_attr(...)]</code> - you can other other builtin attributes if you want, that one just came to mind</p>



<a name="203592806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dan Aloni (da-x) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592806">(Jul 11 2020 at 11:34)</a>:</h4>
<p>Ah I didn't add <code>// edition: 2018</code></p>



<a name="203592810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592810">(Jul 11 2020 at 11:34)</a>:</h4>
<p><code>no_mangle</code> for example would also work</p>



<a name="203592814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592814">(Jul 11 2020 at 11:34)</a>:</h4>
<p>yeah that's the only way AFAIK to import one of these things</p>



<a name="203592827"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592827" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592827">(Jul 11 2020 at 11:35)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> oooooh <code>const_eval_*</code> queries don't print their instances but rather the <code>DefId</code>s, right? whereas <code>normalize_generic_arg_after_erasing_regions</code> prints the <code>ty::GenericArg</code> which is a <code>ty::Const</code> most likely, with full detail</p>



<a name="203592871"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592871" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592871">(Jul 11 2020 at 11:36)</a>:</h4>
<p>okay I see, it actually panics <em>3</em> times</p>



<a name="203592876"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592876" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592876">(Jul 11 2020 at 11:36)</a>:</h4>
<p>there's two partial printouts of the query stack, and the second one is followed by:</p>
<blockquote>
<p>thread panicked while processing panic. aborting.</p>
</blockquote>



<a name="203592885"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592885" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592885">(Jul 11 2020 at 11:37)</a>:</h4>
<p>so you were right about the panic being caught, it's just followed by a double panic :P</p>



<a name="203592938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592938">(Jul 11 2020 at 11:38)</a>:</h4>
<p>the 3rd time (second uncaught panic) it doesn't invoke the hook, however, and just aborts</p>



<a name="203592943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203592943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203592943">(Jul 11 2020 at 11:38)</a>:</h4>
<p>or actually is there any catching? I'm starting to doubt it. either way, <code>report_ice</code> definitely runs twice</p>



<a name="203593483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203593483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dan Aloni (da-x) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203593483">(Jul 11 2020 at 11:55)</a>:</h4>
<p><span class="user-mention" data-user-id="119009">@eddyb</span>  PR <a href="https://github.com/rust-lang/rust/pull/74240">https://github.com/rust-lang/rust/pull/74240</a></p>



<a name="203593528"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203593528" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Dan Aloni (da-x) <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203593528">(Jul 11 2020 at 11:56)</a>:</h4>
<p>I verified that the test catches this, when I ran with the fix reverted.</p>



<a name="203610449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203610449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203610449">(Jul 11 2020 at 19:40)</a>:</h4>
<p><span class="user-mention" data-user-id="244331">@da-x</span> thanks, awesome! spared me of having to juggle my worktrees :P</p>



<a name="203636347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203636347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203636347">(Jul 12 2020 at 09:46)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/146212-t-compiler.2Fconst-eval/topic/anon_const_instance_printing/near/203587322">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="124288">oli</span> oh...... this is what triggers everything.... I'm dumb <a href="https://github.com/rust-lang/rust/blob/master/src/librustc_mir/const_eval/eval_queries.rs#L281-L286">https://github.com/rust-lang/rust/blob/master/src/librustc_mir/const_eval/eval_queries.rs#L281-L286</a></p>
</blockquote>
<p>oh... sorry, that should have been made clearer. The reason it's posted here is because of that comment</p>



<a name="203636355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203636355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203636355">(Jul 12 2020 at 09:46)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/146212-t-compiler.2Fconst-eval/topic/anon_const_instance_printing/near/203587334">said</a>:</p>
<blockquote>
<p>I guess it'd be hard to make it more obvious that it's triggered by that</p>
</blockquote>
<p>we can wrap it in <code>catch_unwind</code> ^^</p>



<a name="203636361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203636361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203636361">(Jul 12 2020 at 09:47)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/146212-t-compiler.2Fconst-eval/topic/anon_const_instance_printing/near/203587727">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="124288">oli</span> so I think that the canary <code>.to_string()</code> should probably be wrapped in a <code>catch_unwind</code></p>
</blockquote>
<p>aha <span aria-label="grinning" class="emoji emoji-1f600" role="img" title="grinning">:grinning:</span> you got to the same conclusion</p>



<a name="203647257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203647257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203647257">(Jul 12 2020 at 15:03)</a>:</h4>
<p>how does that help? I am confused.^^</p>



<a name="203647303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203647303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203647303">(Jul 12 2020 at 15:04)</a>:</h4>
<p>I added that clause because Miri used to ICE with <code>MIRI_LOG=info</code> because we couldnt print some DefId</p>



<a name="203647311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203647311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203647311">(Jul 12 2020 at 15:04)</a>:</h4>
<p>papering over the problem there wont avoid the ICE elsewhere</p>



<a name="203650041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203650041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203650041">(Jul 12 2020 at 16:22)</a>:</h4>
<p>it's not about avoiding the ICE, it's about still getting a reasonable debugging experience</p>



<a name="203650053"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203650053" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203650053">(Jul 12 2020 at 16:23)</a>:</h4>
<p>it was hard to tell from that backtrace where that ICE is happening</p>



<a name="203650063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203650063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203650063">(Jul 12 2020 at 16:23)</a>:</h4>
<p>if we catch the unwinding, we can add more messages</p>



<a name="203660758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203660758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203660758">(Jul 12 2020 at 20:58)</a>:</h4>
<p>it also might be possible to avoid the double backtrace which is otherwise inevitable lol</p>



<a name="203660798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203660798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203660798">(Jul 12 2020 at 20:59)</a>:</h4>
<p>and makes things needlessly confusing (e.g. <span class="user-mention" data-user-id="116122">@simulacrum</span> cut the first one out accidentally and we were left with the aftermath one which had a panic-in-panic with no output from the first panic)</p>



<a name="203660953"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203660953" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203660953">(Jul 12 2020 at 21:02)</a>:</h4>
<p>Part of it was the 400+ line output from just the second one, which makes it hard to digest. It's maybe a good idea to change the double panic message to be more verbose, it's super easy to miss amidst backtraces and cargo output etc</p>



<a name="203660954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203660954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203660954">(Jul 12 2020 at 21:02)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> an example of what <code>catch_unwind</code> could let you do is generate an proper error message printing out the <code>DefId</code> in its rawest form, for ease of debugging</p>



<a name="203660973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203660973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203660973">(Jul 12 2020 at 21:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> there's actually an important difference that is visual and kind of made me feel like there was something weird about the originally posted (second) backtrace that I couldn't put my finger on: it has addresses</p>



<a name="203660974"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203660974" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203660974">(Jul 12 2020 at 21:03)</a>:</h4>
<p>a normal backtrace does not</p>



<a name="203661018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661018">(Jul 12 2020 at 21:04)</a>:</h4>
<p>but it can be subtle lol</p>



<a name="203661022"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661022" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661022">(Jul 12 2020 at 21:04)</a>:</h4>
<p>it could use some ASCII art tbh</p>



<a name="203661028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661028">(Jul 12 2020 at 21:04)</a>:</h4>
<p>Oh huh I completely missed that a normal one doesn't. I think that may have changed at some point?</p>



<a name="203661031"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661031" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661031">(Jul 12 2020 at 21:05)</a>:</h4>
<p>(and we can do that in <code>rustc</code> itself, since we can replicate the TLS "am I already in a panic" thing)</p>



<a name="203661040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661040">(Jul 12 2020 at 21:05)</a>:</h4>
<p>so yeah who wants to make some "nested ICE" ASCII art :P?</p>



<a name="203661251"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661251" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661251">(Jul 12 2020 at 21:10)</a>:</h4>
<p>Perhaps I could interest you in adding <a href="https://github.com/rust-lang/rust/issues/13871">some Lovecraft quotes</a>?</p>



<a name="203661342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661342">(Jul 12 2020 at 21:13)</a>:</h4>
<p>there's been talk of just making panics in dtors abort which I think eliminates double backtraces entirely?</p>



<a name="203661343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661343">(Jul 12 2020 at 21:13)</a>:</h4>
<p>(I guess you can still print them)</p>



<a name="203661410"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661410" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661410">(Jul 12 2020 at 21:14)</a>:</h4>
<p><span class="user-mention" data-user-id="116122">@simulacrum</span> I don't think we have any interesting destructors in rustc</p>



<a name="203661418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661418">(Jul 12 2020 at 21:14)</a>:</h4>
<p>this is panicking in the panic hook</p>



<a name="203661420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661420">(Jul 12 2020 at 21:14)</a>:</h4>
<p><em>before</em> unwinding</p>



<a name="203661430"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661430" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661430">(Jul 12 2020 at 21:15)</a>:</h4>
<p>that's why the second backtrace entirely contains the first one</p>



<a name="203661435"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661435" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661435">(Jul 12 2020 at 21:15)</a>:</h4>
<p>basically no unwinding ever happens</p>



<a name="203661444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661444">(Jul 12 2020 at 21:16)</a>:</h4>
<p>panic -&gt; report_ice -&gt; try to print query stack -&gt; panic -&gt; report_ice -&gt; try to print query stack -&gt; panic -&gt; abort</p>



<a name="203661493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661493">(Jul 12 2020 at 21:16)</a>:</h4>
<p>so there are actually 3 panics lol</p>



<a name="203661499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661499">(Jul 12 2020 at 21:17)</a>:</h4>
<p>(you can tell because there's two query stacks printed, so there's two <code>report_ice</code>s, each of which is capable of triggering the panic again through query stack printing - although I am assuming no weird IO shenanigans)</p>



<a name="203661561"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203661561" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203661561">(Jul 12 2020 at 21:18)</a>:</h4>
<p>anyway the second <code>report_ice</code> is the interesting one, to me. ICE-in-ICE more than panic-in-panic (which is usually panic-while-unwinding)</p>



<a name="203682322"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203682322" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203682322">(Jul 13 2020 at 06:41)</a>:</h4>
<p><span class="user-mention silent" data-user-id="124288">oli</span> <a href="#narrow/stream/146212-t-compiler.2Fconst-eval/topic/anon_const_instance_printing/near/203650041">said</a>:</p>
<blockquote>
<p>it's not about avoiding the ICE, it's about still getting a reasonable debugging experience</p>
</blockquote>
<p>oh, so it would be caught, worked on, and then made to panic again or otherwise abort compilation? that makes sense. to me, "add <code>catch_unwind</code>" sounded like a proposal to just ignore the error.^^</p>



<a name="203682983"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203682983" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203682983">(Jul 13 2020 at 06:55)</a>:</h4>
<p><span class="user-mention" data-user-id="120791">@RalfJ</span> tbh, <code>catch_unwind</code> is useless if you think about it, since <code>rustc</code> aborts due to nested panicking, before <em>ever</em> unwinding, you need to override the panic hook to wrap around the <code>report_ice</code> one or something (or have a global concept of a "critical section" that configures <code>report_ice</code> to present extra information in the ICE output)</p>



<a name="203683069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203683069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203683069">(Jul 13 2020 at 06:57)</a>:</h4>
<p>I guess it's important to distinguish between "panic hook" that pretty much gets called as the first thing when panicking, and the "unwinding" that only runs after the hook is done printing the panic message, backtrace, etc.</p>



<a name="203685269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203685269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203685269">(Jul 13 2020 at 07:33)</a>:</h4>
<p>yea, I know we cant do anything about the main error, but we can at least emit an additional thing before finishing unwinding, which should then show up just before the query stack printing</p>



<a name="203686562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686562">(Jul 13 2020 at 07:52)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> it <strong>never</strong> unwinds!</p>



<a name="203686578"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686578" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686578">(Jul 13 2020 at 07:52)</a>:</h4>
<p>when an ICE happens, the query stack is <em>always</em> printed <em>downstack</em> from the <code>panic!()</code> or <code>bug!()</code> or w/e</p>



<a name="203686599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686599">(Jul 13 2020 at 07:53)</a>:</h4>
<p>öh</p>



<a name="203686610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686610">(Jul 13 2020 at 07:53)</a>:</h4>
<p><span class="user-mention silent" data-user-id="119009">eddyb</span> <a href="#narrow/stream/146212-t-compiler.2Fconst-eval/topic/anon_const_instance_printing/near/203661444">said</a>:</p>
<blockquote>
<p>panic -&gt; report_ice -&gt; try to print query stack -&gt; panic -&gt; report_ice -&gt; try to print query stack -&gt; panic -&gt; abort</p>
</blockquote>
<p>stack depth increases with each -&gt;</p>



<a name="203686632"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686632" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686632">(Jul 13 2020 at 07:53)</a>:</h4>
<p>it aborts at the deepest nesting level</p>



<a name="203686634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686634">(Jul 13 2020 at 07:53)</a>:</h4>
<p>heh lol</p>



<a name="203686637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686637">(Jul 13 2020 at 07:53)</a>:</h4>
<p>ok</p>



<a name="203686648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686648">(Jul 13 2020 at 07:53)</a>:</h4>
<p>that part I did not realize</p>



<a name="203686653"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686653" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686653">(Jul 13 2020 at 07:53)</a>:</h4>
<p>I thought it actually gave up after the second round</p>



<a name="203686655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686655">(Jul 13 2020 at 07:53)</a>:</h4>
<p>this is almost impossible to guess without <em>both</em> backtraces</p>



<a name="203686688"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686688" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686688">(Jul 13 2020 at 07:54)</a>:</h4>
<p>which each have the same partial query stack printed out</p>



<a name="203686715"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686715" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686715">(Jul 13 2020 at 07:54)</a>:</h4>
<p>the second one has the one line message from nested panicking, before aborting</p>



<a name="203686747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686747">(Jul 13 2020 at 07:54)</a>:</h4>
<p>anyway I'll probably forget but like 11h ago I was imagining drawing some ASCII art :P</p>



<a name="203686769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203686769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> oli <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203686769">(Jul 13 2020 at 07:55)</a>:</h4>
<p>haha</p>



<a name="203688513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203688513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203688513">(Jul 13 2020 at 08:18)</a>:</h4>
<p><span class="user-mention" data-user-id="124288">@oli</span> <a href="https://gist.githubusercontent.com/eddyb/17185d9cd23e238fa989194acf8ae89c/raw/4393204aace47364f4e09da7af336dd6cda98d36/ICE%255Eice">https://gist.githubusercontent.com/eddyb/17185d9cd23e238fa989194acf8ae89c/raw/4393204aace47364f4e09da7af336dd6cda98d36/ICE%255Eice</a></p>



<a name="203688527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203688527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203688527">(Jul 13 2020 at 08:18)</a>:</h4>
<p>or <a href="https://gist.github.com/eddyb/17185d9cd23e238fa989194acf8ae89c">https://gist.github.com/eddyb/17185d9cd23e238fa989194acf8ae89c</a></p>



<a name="203688552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203688552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203688552">(Jul 13 2020 at 08:19)</a>:</h4>
<p>shouldn't it be <code>ICE²</code>?</p>



<a name="203688554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203688554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203688554">(Jul 13 2020 at 08:19)</a>:</h4>
<p>emojis are a pain to align, at least in VSCode I get some decent results just by using two spaces as the width of an emoji</p>



<a name="203688567"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203688567" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203688567">(Jul 13 2020 at 08:19)</a>:</h4>
<p>lol</p>



<a name="203688586"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203688586" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203688586">(Jul 13 2020 at 08:19)</a>:</h4>
<p>or maybe</p>
<div class="codehilite"><pre><span></span><code>  ICE
I     I
C     C
E     E
  ICE
</code></pre></div>



<a name="203688612"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203688612" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203688612">(Jul 13 2020 at 08:19)</a>:</h4>
<p>since I'm imagining this would go between two backtraces... oh I'm missing some detail heh</p>



<a name="203688616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203688616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203688616">(Jul 13 2020 at 08:19)</a>:</h4>
<p>I mean, <code>ICE³</code> would be way cooler but that's not what happens ;) (right?)</p>



<a name="203688713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203688713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203688713">(Jul 13 2020 at 08:20)</a>:</h4>
<p>I wish browsers could render like this: <a href="/user_uploads/4715/EEIaD_5z9UNKG3VGu3dBWsUN/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/EEIaD_5z9UNKG3VGu3dBWsUN/image.png" title="image.png"><img src="/user_uploads/4715/EEIaD_5z9UNKG3VGu3dBWsUN/image.png"></a></div>



<a name="203689646"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203689646" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203689646">(Jul 13 2020 at 08:32)</a>:</h4>
<div class="codehilite"><pre><span></span><code>                                  A
                       #  ##  ##  |
                         #   #  # |
                       # #   ###  |
|#| ####   #### #####  # #   #    |
|#|  ##   ##    ##     #  ##  ##  |
|#|  ##  ##     ##
|#|  ##  ##     ####
|#|  ##  ##     ##
|#|  ##   ##    ##
|#| ####   #### #####
\#/
 V
</code></pre></div>



<a name="203689652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203689652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203689652">(Jul 13 2020 at 08:32)</a>:</h4>
<p>I'm done</p>



<a name="203692904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203692904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203692904">(Jul 13 2020 at 09:13)</a>:</h4>
<div class="codehilite"><pre><span></span><code>⢹⡏  ⣴⠋⠉  ⣿⣉⠁
⣸⣇  ⠻⣄⣀  ⣿⣉⡀
</code></pre></div>


<p><a href="/user_uploads/4715/48yvB__rYHE6OFAXGO7Ynfet/image.png">image.png</a></p>
<div class="message_inline_image"><a href="/user_uploads/4715/48yvB__rYHE6OFAXGO7Ynfet/image.png" title="image.png"><img src="/user_uploads/4715/48yvB__rYHE6OFAXGO7Ynfet/image.png"></a></div>



<a name="203693437"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing/near/203693437" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> eddyb <a href="https://rust-lang.github.io/zulip_archive/stream/146212-t-compiler/const-eval/topic/anon_const_instance_printing.html#203693437">(Jul 13 2020 at 09:20)</a>:</h4>
<p>oh right I always forget that's an option :P</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>